<html>
  <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>AgriOcean: Describe this Item</title>
  </head>
  <body class="tundra">
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.js" 
                djConfig="parseOnLoad: false, usePlainJson: true, locale: 'ROOT'" type="text/javascript"></script>
        <script type="text/javascript" src="http://rforms.googlecode.com/files/rforms_ROOT.js"></script>
        <script type="text/javascript" src="http://rforms.googlecode.com/files/rforms.js"></script>
        <script type="text/javascript" src="testdata.js"></script>

        <style>
                @import "http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dijit/themes/tundra/tundra.css";
                @import "http://rforms.googlecode.com/svn/trunk/src/rforms/view/resources/rforms.css";
        </style>
                <h1>Submit: Describe this Item</h1>
                Please fill in the requested information about this submission below. In most browsers, you can use the tab key to move the cursor to the next input box or button, to save you having to use the mouse each time.
                <br></br>
        <script type="text/javascript">
                dojo.require("rforms.template.ItemStore");              
                dojo.require("rdfjson.Graph");
                dojo.require("rforms.model.Engine");
                dojo.require("rforms.view.Editor");

                dojo.addOnLoad(function() {
                        var itemStore = new rforms.template.ItemStore();
                        var template = itemStore.createTemplate(testdata.docType);
                        // var template1 = itemStore.createTemplate(testdata.templateSrc1);
                        // var template2 = itemStore.createTemplate(testdata.templateSrc2);
                        var graph = new rdfjson.Graph(testdata.rdfSrc);
                        // var graph1 = new rdfjson.Graph(testdata.rdfSrc);
                        // var binding1 = rforms.model.match(graph1, "http://example.org/about", template1);
                        var binding = rforms.model.match(graph, "http://example.org/about", template);
                        // var binding2 = rforms.model.match(graph1, "http://example.org/about", template2);
                        new rforms.view.Editor({template: template, binding: binding, includeLevel: "optional"}, "compactView");
                        // new rforms.view.Editor({template: template1, binding: binding1}, "compactView2");
                        // new rforms.view.Editor({template: template2, binding: binding2}, "compactView3");
                        // execute on a save button: if (binding.report().errors.length > 0 ) {editor.report();}
                });
        </script>

        <div id="compactView"></div>
    </br>
        <div id="compactView2"></div>
    </br>
        <div id="compactView3"></div>

        <form name="input" action="" method="get">
        <input type="submit" value="Submit" />
        </form>

  </body>
</html>
